int TemplateFunc_GetServiceManager(IBundleContext * pBundleContext, IServiceManager * pServiceManager)
{
    if(NULL == pBundleContext) return USUAL_ERROR;

    int iRet = sspBundleContext->GetServiceManager(&pServiceManager);

    return iRet

}

ILogger * TemplateFunc_GetLocalLogger(IServiceManager * pServiceManager, const char * logFileName, const cahr * bundleName)
{
    if( NULL == pServiveManager || NULL == logFileName || NULL == bundleName) return NULL;
    IService * pLoggerFactory = NULL;
    pServiceManager->GetService(IID_ConfigParserFactory, &pLoggerFactory, SID_ConfigParserFactory, 0);
    if(NULL == pLoggerFactory) return NULL;
    ILogger * pLogger = pLoggerFactory->CreateBundleLogger(logFileName,bundleName);
    if(NULL == pLogger) return NULL;
    return pLogger;
}

void TemplateFunc_WriterTraceLog(ILogger * pLogger, const char * str)
{
    pLogger->TraceLog("%s",str);
}

void TemplateFunc_WriterInfoLog(ILogger * pLogger, const char * str)
{
    pLogger->InfoLog("%s",str);
}

void TemplateFunc_WriterDebugLog(ILogger * pLogger, const char * str)
{
    pLogger->DebugLog("%s",str);
}

void TemplateFunc_WriterWarnLog(ILogger * pLogger, const char * str)
{
    pLogger->WarnLog("%s",str);
}

void TemplateFunc_WriterErrorLog(ILogger * pLogger, const char * str)
{
    pLogger->ErrorLog("%s",str);
}

void TemplateFunc_WriterFataLog(ILogger * pLogger, const char * str)
{
    pLogger->FatalLog("%s",str);
}
